<div id="navigation">
	<a href="{U_HOME}">{DOMAIN} {L_CPANEL_INDEX}</a> :: <a href="{U_SSL_MANAGER}">SSL Manager</a> :: Keys 
</div>
<br />
<script>
function checkkey() {
        if ((document.keyform.host.value == "")) {
                alert("You must enter a valid host to generate a key.");
                return (false);
        }
}
function loaddomain() {
	document.keyform.host.value = document.keyform.domain.options[document.keyform.domain.selectedIndex].value;
}
</script> 
<div class="row1" align="center" width="100%">
	<b>Keys on Server</b> 
</div>
<br />
Note that deleting a key will remove the Certificate Signing Request (CSR) and Certificate (CRT) if it exists.<br /><br />
<table align="center">
	<tr>
		<th>
			Key Domain
		</th>
		<th>
			Actions
		</th>
	</tr>
<!-- BEGIN switch_no_key -->
	<tr>
		<td>
			No SSL Keys found
		</td>
		<td>
		</td>
	</tr>
<!-- END switch_no_key -->
<!-- BEGIN current_key_row -->
	<tr>
		<td>
			{current_key_row.KEY_NAME}
		</td>
		<td>
			<a href="{current_key_row.U_VIEW}">View</a> :: <a href="{current_key_row.U_DELETE}">Delete</a>
		</td>
	</tr>
<!-- END current_key_row -->
</table>
<br />
<br />
<div class="row1" align="center" width="100%">
	<b>Generate New Key</b> 
</div>
<br />
If you select a domain from the list in the pull-down menu, it will automatically be placed in the host text box. Alternatively, type the domain into the host text box manually.<br /><br />
<form action="{S_GENERATE_KEY}" name="keyform" method="{S_METHOD}" onSubmit="return checkkey();">
	<table align="center">
		<tr>
			<td>
				Host 
			</td>
			<td>
				<input type="text" name="host" size="50"> &lt;- <select name="domain" onChange="loaddomain();"> 
					<option value="-">
						(Select a Domain) 
					</option>
					{S_DOMAIN_OPTIONS} </select> 
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="hidden" name="item" value="key"> <input type="hidden" name="itemname" value="Key"> <input type="submit" value="Generate">
			</td>
		</tr>
	</table>
</form>
<br /><br />
<div class="row1" align="center" width="100%">
	<b>Upload Key</b> 
</div>
<br />
It is recommended that you upload the Certificate (.crt) file first so it can be matched with the Key (.key) file. 
<br />
<br />
<form action="{S_UPLOAD_KEY}" method="{S_METHOD}" ENCTYPE="multipart/form-data">
	<table>
		<tr>
			<td>
				Paste the key in the textbox to the right.
			</td>
			<td>
				<textarea name="key" rows="20" cols="60">
				</textarea>
			</td>
		</tr>
		<tr>
			<td>
				Alternatively, choose a .key file: 
			</td>
			<td>
				<input type="file" name="keyfile"> 
			</td>
		</tr>
		<tr>
			<td>
				Key Domain 
			</td>
			<td>
				<input type="text" name="domain"> 
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input type="submit" value="Upload"> 
			</td>
		</tr>
	</table>
</form>
